package com.spl.chapter2.controller;

import com.spl.chapter2.entity.TestBean;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.context.properties.EnableConfigurationProperties;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

@RestController
@EnableConfigurationProperties({TestBean.class})
public class TestController {
    @Autowired
    TestBean test;

    @RequestMapping(value = "/test")
    public String test(){
        return test.getSite()+test.getYear();
    }
}
